<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .demo01{
            height: 600px;
        }
        /* 小于等于500 */
        @media(max-width:500px){
            .demo01{
                width: 100%;
                background-color: aquamarine;
            }
        }
        /* 大于500 */
        @media(min-width:500px){
            .demo01{
                width: 100%;
                background-color: pink;
            }
        }
    </style>
</head>
<body>
    <div class="demo01">

    </div>
</body>
</html>